package com.qiche.service;

import com.github.pagehelper.PageInfo;
import com.qiche.aspect.Result;
import com.qiche.dto.RegisterDto;
import com.qiche.vo.MiniHomeStatementDatVo;
import com.qiche.model.User;

import java.util.Date;

/**
 * Created by Linzw on 2018/01/24.
 */
public interface UserService extends IService<User>{
    Result<User> login(String username, String password,boolean rememberMe);

    Result<String> logout();

    Result<User> register(User user);

    Result<User> saveUserBySystem(User user);

    Result<String> forgetCheckVerifyCode(String username,String verifyCode);

    Result<String> forgetResetPassword(String username,String passwordNew,String forgetToken);


    PageInfo<User> selectByPage(User user, int start, int length);

    User selectByUsername(String username);
    
    User selectByMerchantId(Integer merchantId);

    void delUser(Integer userid);

	Result<User> register(RegisterDto dto);

	Boolean isUsernameExist(String username);

	User selectById(Long id);

    /**
     * 用户通过 时间段,获取小程序首页 数据报表展示
     * @param user
     * @param startTime
     * @param endTime
     * @return
     */
     MiniHomeStatementDatVo getMiniHomeStatement(User user,
                                                 Date startTime,
                                                 Date endTime);


    PageInfo<User> selectClerksByPage(User user, int page, int limit);
}
